extends ../components/base
block title
    title 公文管理
block style
    link(rel='stylesheet', href=__CSS_PATH__ + '/news.css')
block aside_content
    include ../components/mixin
    -var routerObj = [{link:'/docu/docu_list',text:'公文查阅'},{link:'/docu/docu_create',text:'公文发布'},{link:'/docu/docu_manage',text:'公文管理'},{link:'/docu/docu_approve',text:'待我审核'}]
    +asideNav(routerObj,2)
block main_content
    include ../components/mixin
    +RouteNav('公文管理')
    .condition
        .inline-group
            label(for='title') 主题:
            input#title(type='text')
        .inline-group
            label(for='readStatus') 公文状态:
            select#readStatus
                option(value) 请选择
                option(value="0") 未阅读
                option(value="1") 已阅读
        .inline-group
            label(for='date') 发布时间:
            input#date(type='text')
        .inline-group
            button.btn.btn-warning.btn-sm(type='button' style='margin-left:20px' onclick='searchSomething();') 查询
            button.btn.btn-default.btn-sm(type='button' style='margin-left:20px' onclick='window.location.href="/docu/docu_create"') 新建
            button.btn.btn-default.btn-sm(type='button' onclick='deleteSomething("document","document");') 删除
    #inner-wrapper
        .content-list.section-block
            table.table.table-bordered
                thead
                    tr
                        td
                            input(type='checkbox')
                        td  标题
                        td  发布人
                        td  发布时间
                        td  发布状态
                        td  操作
                tbody
                    if(doucments.length)
                        each document in doucments
                            tr
                                td
                                    input(type='checkbox' data-id=document.commonalityArticleId)
                                td.link  #{document.title}
                                td  #{document.publicName}
                                td  #{document.publicTime}
                                td  #{document.approveStatus === 0 ? "未审批" : document.approveStatus === 1 ? '审批通过' : document.approveStatus === 2 ? '审批不通过' : '他人已审批'}
                                td
                                    a.link(href='/docu/docu_detail?edit=true&commonalityArticleId='+document.commonalityArticleId) 编辑
        if(rowsCount > 10)
            #pageInfo.pager(style="text-align:center" data-count=rowsCount)
block script
    script(type="text/javascript").
        initSearchInfo();



